#ifndef ARCHIVEQBYTEARRAYSTREAM_H
#define ARCHIVEQBYTEARRAYSTREAM_H

#include <QByteArray>
#include "lib7zip.h"

class ArchiveQByteArrayStream : public C7ZipOutStream
{
public:
    ArchiveQByteArrayStream();
    virtual ~ArchiveQByteArrayStream();
    virtual int Write(const void *data, unsigned int size, unsigned int *processedSize);
    virtual int Seek(long long offset, unsigned int seekOrigin, unsigned long long *newPosition);
    virtual int SetSize(unsigned long long size);
    QByteArray *byteArray();

private:
    QByteArray *ba;
    qint64 pos;
};

#endif // ARCHIVEQBYTEARRAYSTREAM_H
